package com.dozen.commonbase.view.cube;

import android.content.Context;
import android.graphics.PixelFormat;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;

/**
 * @author: Dozen
 * @description:
 * @time: 2021/11/12
 */
public class CubeView extends GLSurfaceView {

    private Context context;

    public CubeView(Context context) {
        super(context);
        this.context = context;
        init();
    }

    public CubeView(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.context = context;
        init();
    }

    private void init() {

        setEGLConfigChooser(8, 8, 8, 8, 16, 0);
        getHolder().setFormat(PixelFormat.TRANSLUCENT);
        setZOrderOnTop(true);

        // Request an OpenGL ES 2.0 compatible context.
        setEGLContextClientVersion(2);

    }
}
